Skip to content

Conversation

@tillkruss
Copy link
Member

@tillkruss tillkruss commented Oct 6, 2025

This should avoid stale WooCommerce data.

@tillkruss tillkruss self-assigned this Oct 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionality to automatically delete all transients from the database when the Redis object cache is enabled. The change ensures that stale transients don't persist after cache activation by hooking into a new action that fires when cache enablement occurs.

  • Introduces a new action hook redis_object_cache_enable that fires when cache is enabled via CLI
  • Adds a method to delete all transients from both options and sitemeta tables when cache activation succeeds
  • Updates changelog to document the new transient deletion feature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
includes/cli/class-commands.php Adds the new redis_object_cache_enable action hook in the cache enable command
includes/class-plugin.php Implements the transient deletion logic and hooks it to the new action
CHANGELOG.md Documents the new transient deletion feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Update parameter name in maybe_delete_transients method.
@tillkruss tillkruss merged commit d0f56d4 into develop Oct 6, 2025
27 of 29 checks passed
@tillkruss tillkruss deleted the fix/delete-transients branch October 6, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants